package cn.crex1.xiaomi.core.mvc.beans.config;

import cn.crex1.xiaomi.core.mvc.annotation.Component;
import cn.crex1.xiaomi.core.mvc.beans.BeanMetadata;

public class BeanClassMetadata implements BeanMetadata {

	private String beanClassName;
	private Class<?> beanClass;

	@Override
	public String getTyeName() {
		return beanClassName;
	}

	@Override
	public Object getTyeClass() {
		return beanClass;
	}

	@Override
	public Object getModifierType() {
		return null;
	}

	/**
	 * 生成beanname
	 */
	@Override
	public void setTyeName(Object beanClass) {
		if (BeanDefinitionUtil.isAnnotation(Component.class, (Class)beanClass)) {
			BeanDefinitionUtil.generateClassName(beanClass.getClass());
		}
	}
	/**
	 * 生成bean的类型
	 */
	@Override
	public void setTyeClass(Object beanClass) {
		this.beanClass=(Class<?>) beanClass;

	}

	@Override
	public void setModifierType(Object beanClass) {
	}

}
